/*
 * Copyright (c) 2009, Jan Pastor. All Rights Reserved.
 */

package sk.jp.jitag.dao.db4o.model;

import sk.jp.jitag.dao.db4o.Column;

public class DomesticAnimal extends Animal {

    private static final Column _NAME = new Column("name");
    private static final Column _OWNER = new Column("owner");

    private String name;
    private Child owner = null;

    //----------------------------------------------------------------------

    public DomesticAnimal(AnimalSort sort) {
        super(sort);
    }

    /**
     * @return name or null.
     */
    public String getName() {
        return name;
    }

    public DomesticAnimal setName(String name) {
        this.name = name;
        return this;
    }

    /**
     * @return owner or null.
     */
    public Child getOwner() {
        return owner;
    }

    public void setOwner(Child owner) {
        this.owner = owner;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("DomesticAnimal");
        sb.append("{name='").append(name).append('\'');
        sb.append(", owner=").append(owner);
        sb.append(", ").append(super.toString());
        sb.append('}');
        return sb.toString();
    }
}
